package com.sg.dto.biz.app.common;

import com.sg.common.annotations.TreeType;
import com.sg.common.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

/**
 * @desc AlignGgoalsResponsiblePersonDto
 * @使用场景
 */
@Data
public class AlignGgoalsResponsiblePersonDto
        extends BaseDto
        implements Serializable {

    /**
     * 指标ID
     */
    @TreeType("id")
    @ApiModelProperty("指标ID")
    private String objectiveId;

    /**
     * 指标简称
     */
    @ApiModelProperty("指标简称")
    private String objectiveShortName;

    /**
     * 归属父级指标ID
     */
    @TreeType("pid")
    @ApiModelProperty("归属父级指标ID")
    private String parentObjectiveId;

    /**
     * 归属父级目标分类ID
     */
    @ApiModelProperty("归属父级目标分类ID")
    private String parentTargetCategoryId;

    /**
     * 个人排序
     */
    @ApiModelProperty("个人排序")
    private Long personalOrderNumber;

    /**
     * 冗余评价模板ID
     */
    @ApiModelProperty("冗余评价模板ID")
    private String evaluationTemplateId;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        AlignGgoalsResponsiblePersonDto that = (AlignGgoalsResponsiblePersonDto) o;
        return objectiveId == that.objectiveId && objectiveShortName == that.objectiveShortName && parentObjectiveId == that.parentObjectiveId && parentTargetCategoryId == that.parentTargetCategoryId && personalOrderNumber == that.personalOrderNumber && evaluationTemplateId == that.evaluationTemplateId;
    }

    @Override
    public int hashCode() {
        return Objects.hash(super.hashCode(), objectiveId, objectiveShortName, parentObjectiveId, parentTargetCategoryId, personalOrderNumber, evaluationTemplateId);
    }

}
